<?xml version="1.0" encoding="UTF-8"?>
<definitions id="taskCompleteWithVariablesInReturnExample"
	xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
	xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
	targetNamespace="Examples">

	<process
		id="TaskServiceTest.testCompleteTaskWithVariablesInReturn"
		name="complete task with variables in return" isExecutable="true">

		<startEvent id="theStart" />

		<sequenceFlow id="flow1" sourceRef="theStart"
			targetRef="task1" />

		<userTask id="task1" name="First User Task" />

		<sequenceFlow id="flow2" sourceRef="task1"
			targetRef="task2" />

		<scriptTask id="task2" name="Groovy Script"
			scriptFormat="groovy">
			<script>
				<![CDATA[
				sleep(1000)
				execution.setVariable('x', 5)
				]]>
			</script>
		</scriptTask>
		<sequenceFlow id="flow3" sourceRef="task2"
			targetRef="task3" />

		<userTask id="task3" name="Second User Task" />

		<sequenceFlow id="flow4" sourceRef="task3"
			targetRef="theEnd" />

		<endEvent id="theEnd" />

	</process>

</definitions>
